Import('env dbg opt')

objs = []
for subdir in ['Rolemaster']:
	o = SConscript('%s/SConscript' % subdir)
	objs.append(o)

logger = env.Object('Logger.cpp')
objs.append(logger)
socket = env.Object('Socket.cpp')
objs.append(socket)

server = env.Object('Server.cpp')
client = env.Object('Client.cpp')

rmclient = env.Program(target = '#bin/rmclient', source = [client, objs])
rmserver = env.Program(target = '#bin/rmserver', source = [server, objs])

# Install files
env.Install('/usr/local/bin', [rmclient,rmserver])
env.Alias('install', '/usr/local/games')
